package com.example.sunran.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
public class LoveController {

    @ResponseBody
    @PostMapping("/checkIsLove")
    public String checkIsLove(@RequestBody Map<String,String> map){
        String answer = map.get("answer");
        System.out.println(answer);
        if (answer.equals("我爱你")) {
            return "yes";
        }else{
            return "no";
        }

    }
}
